package tasktracker.core.loader;

import java.util.HashMap;
import java.util.Map;

import tasktracker.abstraction.ITaskTracker;
import tasktracker.abstraction.ITaskTrackerFactory;

public class DefaultTaskTrackerFactory implements ITaskTrackerFactory {

	private String name;
	private ITaskTracker tracker;

	public DefaultTaskTrackerFactory() {
	}

	public DefaultTaskTrackerFactory(String name, ITaskTracker tracker) {
		this.name = name;
		this.tracker = tracker;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ITaskTracker getTracker() {
		return tracker;
	}

	public void setTracker(ITaskTracker tracker) {
		this.tracker = tracker;
	}

	@Override
	public Map<String, ITaskTracker> getInstances() {
		Map<String, ITaskTracker> map = new HashMap<String, ITaskTracker>(1);
		map.put(name, tracker);
		return map;
	}
}
